package com.issc.framework.util;

import java.io.IOException;
import java.net.ServerSocket;
import java.net.Socket;
import java.util.Collection;

public class Person {
    String name;

    public Person(String name) {
        this.name = name;
    }

//
//@Override
//    public boolean equals(Object o) {
//        if (this == o) return true;
//        if (o == null || getClass() != o.getClass()) return false;
//
//        Person person = (Person) o;
//
//        return name != null ? name.equals(person.name) : person.name == null;
//    }
//
//    @Override
//    public int hashCode() {
//        return name != null ? name.hashCode() : 0;
//    }
    public static void main(String[] args) {
        String s1=new String("100");
        String s2=new String("100");
        System.out.println(s1==s2);
        System.out.println(s1.equals(s2));

        Integer integer=new Integer(100);
        Long lg=new Long(100);

        System.out.println(integer.equals(lg));

        Person person=new Person("100");
        Person person1=new Person("100");
        System.out.println(person.equals(person1));
        System.out.println(person.hashCode());
        double d1=-0.5;
        System.out.println("Ceil d1="+Math.ceil(d1));
        System.out.println("floor d1="+Math.floor(d1));
        System.out.println("" +Math.round(-11.5));
        String a="44";
        String b="444";
        System.out.println(b.compareTo(a));
        Thread t=new Thread(){
            public  void run(){
                pong();
            }
        };
        t.run();
        System.out.println("ping");
    }
    static void pong(){
        System.out.println("pong");
    }

}
